#- Completion and Error Codes ----------------------------------------------*/

const VI_SUCCESS = 0
const VI_ERROR  = -2147483647-1  # 0x80000000 

const VI_SUCCESS_EVENT_EN                 =  0x3FFF0002 # 3FFF0002,  1073676290 
const VI_SUCCESS_EVENT_DIS                =  0x3FFF0003 # 3FFF0003,  1073676291 
const VI_SUCCESS_QUEUE_EMPTY              =  0x3FFF0004 # 3FFF0004,  1073676292 
const VI_SUCCESS_TERM_CHAR                =  0x3FFF0005 # 3FFF0005,  1073676293 
const VI_SUCCESS_MAX_CNT                  =  0x3FFF0006 # 3FFF0006,  1073676294 
const VI_SUCCESS_DEV_NPRESENT             =  0x3FFF007D # 3FFF007D,  1073676413 
const VI_SUCCESS_TRIG_MAPPED              =  0x3FFF007E # 3FFF007E,  1073676414 
const VI_SUCCESS_QUEUE_NEMPTY             =  0x3FFF0080 # 3FFF0080,  1073676416 
const VI_SUCCESS_NCHAIN                   =  0x3FFF0098 # 3FFF0098,  1073676440 
const VI_SUCCESS_NESTED_SHARED            =  0x3FFF0099 # 3FFF0099,  1073676441 
const VI_SUCCESS_NESTED_EXCLUSIVE         =  0x3FFF009A # 3FFF009A,  1073676442 
const VI_SUCCESS_SYNC                     =  0x3FFF009B # 3FFF009B,  1073676443 

const VI_WARN_QUEUE_OVERFLOW              =  0x3FFF000C # 3FFF000C,  1073676300 
const VI_WARN_CONFIG_NLOADED              =  0x3FFF0077 # 3FFF0077,  1073676407 
const VI_WARN_NULL_OBJECT                 =  0x3FFF0082 # 3FFF0082,  1073676418 
const VI_WARN_NSUP_ATTR_STATE             =  0x3FFF0084 # 3FFF0084,  1073676420 
const VI_WARN_UNKNOWN_STATUS              =  0x3FFF0085 # 3FFF0085,  1073676421 
const VI_WARN_NSUP_BUF                    =  0x3FFF0088 # 3FFF0088,  1073676424 
const VI_WARN_EXT_FUNC_NIMPL              =  0x3FFF00A9 # 3FFF00A9,  1073676457 

const VI_ERROR_SYSTEM_ERROR      = VI_ERROR+0x3FFF0000 # BFFF0000, -1073807360 
const VI_ERROR_INV_OBJECT        = VI_ERROR+0x3FFF000E # BFFF000E, -1073807346 
const VI_ERROR_RSRC_LOCKED       = VI_ERROR+0x3FFF000F # BFFF000F, -1073807345 
const VI_ERROR_INV_EXPR          = VI_ERROR+0x3FFF0010 # BFFF0010, -1073807344 
const VI_ERROR_RSRC_NFOUND       = VI_ERROR+0x3FFF0011 # BFFF0011, -1073807343 
const VI_ERROR_INV_RSRC_NAME     = VI_ERROR+0x3FFF0012 # BFFF0012, -1073807342 
const VI_ERROR_INV_ACC_MODE      = VI_ERROR+0x3FFF0013 # BFFF0013, -1073807341 
const VI_ERROR_TMO               = VI_ERROR+0x3FFF0015 # BFFF0015, -1073807339 
const VI_ERROR_CLOSING_FAILED    = VI_ERROR+0x3FFF0016 # BFFF0016, -1073807338 
const VI_ERROR_INV_DEGREE        = VI_ERROR+0x3FFF001B # BFFF001B, -1073807333 
const VI_ERROR_INV_JOB_ID        = VI_ERROR+0x3FFF001C # BFFF001C, -1073807332 
const VI_ERROR_NSUP_ATTR         = VI_ERROR+0x3FFF001D # BFFF001D, -1073807331 
const VI_ERROR_NSUP_ATTR_STATE   = VI_ERROR+0x3FFF001E # BFFF001E, -1073807330 
const VI_ERROR_ATTR_READONLY     = VI_ERROR+0x3FFF001F # BFFF001F, -1073807329 
const VI_ERROR_INV_LOCK_TYPE     = VI_ERROR+0x3FFF0020 # BFFF0020, -1073807328 
const VI_ERROR_INV_ACCESS_KEY    = VI_ERROR+0x3FFF0021 # BFFF0021, -1073807327 
const VI_ERROR_INV_EVENT         = VI_ERROR+0x3FFF0026 # BFFF0026, -1073807322 
const VI_ERROR_INV_MECH          = VI_ERROR+0x3FFF0027 # BFFF0027, -1073807321 
const VI_ERROR_HNDLR_NINSTALLED  = VI_ERROR+0x3FFF0028 # BFFF0028, -1073807320 
const VI_ERROR_INV_HNDLR_REF     = VI_ERROR+0x3FFF0029 # BFFF0029, -1073807319 
const VI_ERROR_INV_CONTEXT       = VI_ERROR+0x3FFF002A # BFFF002A, -1073807318 
const VI_ERROR_QUEUE_OVERFLOW    = VI_ERROR+0x3FFF002D # BFFF002D, -1073807315 
const VI_ERROR_NENABLED          = VI_ERROR+0x3FFF002F # BFFF002F, -1073807313 
const VI_ERROR_ABORT             = VI_ERROR+0x3FFF0030 # BFFF0030, -1073807312 
const VI_ERROR_RAW_WR_PROT_VIOL  = VI_ERROR+0x3FFF0034 # BFFF0034, -1073807308 
const VI_ERROR_RAW_RD_PROT_VIOL  = VI_ERROR+0x3FFF0035 # BFFF0035, -1073807307 
const VI_ERROR_OUTP_PROT_VIOL    = VI_ERROR+0x3FFF0036 # BFFF0036, -1073807306 
const VI_ERROR_INP_PROT_VIOL     = VI_ERROR+0x3FFF0037 # BFFF0037, -1073807305 
const VI_ERROR_BERR              = VI_ERROR+0x3FFF0038 # BFFF0038, -1073807304 
const VI_ERROR_IN_PROGRESS       = VI_ERROR+0x3FFF0039 # BFFF0039, -1073807303 
const VI_ERROR_INV_SETUP         = VI_ERROR+0x3FFF003A # BFFF003A, -1073807302 
const VI_ERROR_QUEUE_ERROR       = VI_ERROR+0x3FFF003B # BFFF003B, -1073807301 
const VI_ERROR_ALLOC             = VI_ERROR+0x3FFF003C # BFFF003C, -1073807300 
const VI_ERROR_INV_MASK          = VI_ERROR+0x3FFF003D # BFFF003D, -1073807299 
const VI_ERROR_IO                = VI_ERROR+0x3FFF003E # BFFF003E, -1073807298 
const VI_ERROR_INV_FMT           = VI_ERROR+0x3FFF003F # BFFF003F, -1073807297 
const VI_ERROR_NSUP_FMT          = VI_ERROR+0x3FFF0041 # BFFF0041, -1073807295 
const VI_ERROR_LINE_IN_USE       = VI_ERROR+0x3FFF0042 # BFFF0042, -1073807294 
const VI_ERROR_NSUP_MODE         = VI_ERROR+0x3FFF0046 # BFFF0046, -1073807290 
const VI_ERROR_SRQ_NOCCURRED     = VI_ERROR+0x3FFF004A # BFFF004A, -1073807286 
const VI_ERROR_INV_SPACE         = VI_ERROR+0x3FFF004E # BFFF004E, -1073807282 
const VI_ERROR_INV_OFFSET        = VI_ERROR+0x3FFF0051 # BFFF0051, -1073807279 
const VI_ERROR_INV_WIDTH         = VI_ERROR+0x3FFF0052 # BFFF0052, -1073807278 
const VI_ERROR_NSUP_OFFSET       = VI_ERROR+0x3FFF0054 # BFFF0054, -1073807276 
const VI_ERROR_NSUP_VAR_WIDTH    = VI_ERROR+0x3FFF0055 # BFFF0055, -1073807275 
const VI_ERROR_WINDOW_NMAPPED    = VI_ERROR+0x3FFF0057 # BFFF0057, -1073807273 
const VI_ERROR_RESP_PENDING      = VI_ERROR+0x3FFF0059 # BFFF0059, -1073807271 
const VI_ERROR_NLISTENERS        = VI_ERROR+0x3FFF005F # BFFF005F, -1073807265 
const VI_ERROR_NCIC              = VI_ERROR+0x3FFF0060 # BFFF0060, -1073807264 
const VI_ERROR_NSYS_CNTLR        = VI_ERROR+0x3FFF0061 # BFFF0061, -1073807263 
const VI_ERROR_NSUP_OPER         = VI_ERROR+0x3FFF0067 # BFFF0067, -1073807257 
const VI_ERROR_INTR_PENDING      = VI_ERROR+0x3FFF0068 # BFFF0068, -1073807256 
const VI_ERROR_ASRL_PARITY       = VI_ERROR+0x3FFF006A # BFFF006A, -1073807254 
const VI_ERROR_ASRL_FRAMING      = VI_ERROR+0x3FFF006B # BFFF006B, -1073807253 
const VI_ERROR_ASRL_OVERRUN      = VI_ERROR+0x3FFF006C # BFFF006C, -1073807252 
const VI_ERROR_TRIG_NMAPPED      = VI_ERROR+0x3FFF006E # BFFF006E, -1073807250 
const VI_ERROR_NSUP_ALIGN_OFFSET = VI_ERROR+0x3FFF0070 # BFFF0070, -1073807248 
const VI_ERROR_USER_BUF          = VI_ERROR+0x3FFF0071 # BFFF0071, -1073807247 
const VI_ERROR_RSRC_BUSY         = VI_ERROR+0x3FFF0072 # BFFF0072, -1073807246 
const VI_ERROR_NSUP_WIDTH        = VI_ERROR+0x3FFF0076 # BFFF0076, -1073807242 
const VI_ERROR_INV_PARAMETER     = VI_ERROR+0x3FFF0078 # BFFF0078, -1073807240 
const VI_ERROR_INV_PROT          = VI_ERROR+0x3FFF0079 # BFFF0079, -1073807239 
const VI_ERROR_INV_SIZE          = VI_ERROR+0x3FFF007B # BFFF007B, -1073807237 
const VI_ERROR_WINDOW_MAPPED     = VI_ERROR+0x3FFF0080 # BFFF0080, -1073807232 
const VI_ERROR_NIMPL_OPER        = VI_ERROR+0x3FFF0081 # BFFF0081, -1073807231 
const VI_ERROR_INV_LENGTH        = VI_ERROR+0x3FFF0083 # BFFF0083, -1073807229 
const VI_ERROR_INV_MODE          = VI_ERROR+0x3FFF0091 # BFFF0091, -1073807215 
const VI_ERROR_SESN_NLOCKED      = VI_ERROR+0x3FFF009C # BFFF009C, -1073807204 
const VI_ERROR_MEM_NSHARED       = VI_ERROR+0x3FFF009D # BFFF009D, -1073807203 
const VI_ERROR_LIBRARY_NFOUND    = VI_ERROR+0x3FFF009E # BFFF009E, -1073807202 
const VI_ERROR_NSUP_INTR         = VI_ERROR+0x3FFF009F # BFFF009F, -1073807201 
const VI_ERROR_INV_LINE          = VI_ERROR+0x3FFF00A0 # BFFF00A0, -1073807200 
const VI_ERROR_FILE_ACCESS       = VI_ERROR+0x3FFF00A1 # BFFF00A1, -1073807199 
const VI_ERROR_FILE_IO           = VI_ERROR+0x3FFF00A2 # BFFF00A2, -1073807198 
const VI_ERROR_NSUP_LINE         = VI_ERROR+0x3FFF00A3 # BFFF00A3, -1073807197 
const VI_ERROR_NSUP_MECH         = VI_ERROR+0x3FFF00A4 # BFFF00A4, -1073807196 
const VI_ERROR_INTF_NUM_NCONFIG  = VI_ERROR+0x3FFF00A5 # BFFF00A5, -1073807195 
const VI_ERROR_CONN_LOST         = VI_ERROR+0x3FFF00A6 # BFFF00A6, -1073807194 
const VI_ERROR_MACHINE_NAVAIL    = VI_ERROR+0x3FFF00A7 # BFFF00A7, -1073807193 
const VI_ERROR_NPERMISSION       = VI_ERROR+0x3FFF00A8 # BFFF00A8, -1073807192 


# Dictionary mapping codes to more verbose information #
# See Appendix A of the NI-VISA Programmers Reference
#Dictionary maps integer codes to tuples of (Code, Meaning)
codes = Dict{Int,Tuple{ASCIIString,ASCIIString}}(
    VI_SUCCESS => ("VI_SUCCESS", "Operation completed successfully."),
    VI_SUCCESS_EVENT_EN => ("VI_SUCCESS_EVENT_EN", "Specified event is already enabled for at least one of the specified mechanisms."),
    VI_SUCCESS_EVENT_DIS => ("VI_SUCCESS_EVENT_DIS", "Specified event is already disabled for at least one of the specified mechanisms."),
    VI_SUCCESS_QUEUE_EMPTY => ("VI_SUCCESS_QUEUE_EMPTY", "Operation completed successfully, but queue was already empty."),
    VI_SUCCESS_TERM_CHAR => ("VI_SUCCESS_TERM_CHAR", "The specified termination character was read."),
    VI_SUCCESS_MAX_CNT => ("VI_SUCCESS_MAX_CNT", "The number of bytes transferred is equal to the requested input count. More data may be available."),
    VI_SUCCESS_DEV_NPRESENT => ("VI_SUCCESS_DEV_NPRESENT", "Session opened successfully, but the device at the specified address is not responding."),
    VI_SUCCESS_TRIG_MAPPED => ("VI_SUCCESS_TRIG_MAPPED", "The path from trigSrc to trigDest is already mapped."),
    VI_SUCCESS_QUEUE_NEMPTY => ("VI_SUCCESS_QUEUE_NEMPTY", "Wait terminated successfully on receipt of an event notification. There is at least one more event object of the requested type(s) available for this session."),
    VI_SUCCESS_NCHAIN => ("VI_SUCCESS_NCHAIN", "Event handled successfully. Do not invoke any other handlers on this session for this event."),
    VI_SUCCESS_NESTED_SHARED => ("VI_SUCCESS_NESTED_SHARED", "Operation completed successfully, and this session has nested shared locks."),
    VI_SUCCESS_NESTED_EXCLUSIVE=> ("VI_SUCCESS_NESTED_EXCLUSIVE", "Operation completed successfully, and this session has nested exclusive locks."),
    VI_SUCCESS_SYNC => ("VI_SUCCESS_SYNC", "Operation completed successfully, but the operation was actually synchronous rather than asynchronous."),
    VI_WARN_QUEUE_OVERFLOW => ("VI_WARN_QUEUE_OVERFLOW", "VISA received more event information of the specified type than the configured queue size could hold."),
    VI_WARN_CONFIG_NLOADED => ("VI_WARN_CONFIG_NLOADED", "The specified configuration either does not exist or could not be loaded. VISA-specified defaults will be used."),
    VI_WARN_NULL_OBJECT => ("VI_WARN_NULL_OBJECT", "The specified object reference is uninitialized."),
    VI_WARN_NSUP_ATTR_STATE => ("VI_WARN_NSUP_ATTR_STATE", "Although the specified state of the attribute is valid, it is not supported by this implementation."),
    VI_WARN_UNKNOWN_STATUS => ("VI_WARN_UNKNOWN_STATUS", "The status code passed to the operation could not be interpreted."),
    VI_WARN_NSUP_BUF => ("VI_WARN_NSUP_BUF", "The specified I/O buffer type is not supported."),
    VI_WARN_EXT_FUNC_NIMPL => ("VI_WARN_EXT_FUNC_NIMPL", "The operation succeeded, but a lower level driver did not implement the extended functionality."),
    VI_ERROR_SYSTEM_ERROR => ("VI_ERROR_SYSTEM_ERROR", "Unknown system error (miscellaneous error)."),
    VI_ERROR_INV_OBJECT => ("VI_ERROR_INV_OBJECT", "The given session or object reference is invalid."),
    VI_ERROR_RSRC_LOCKED => ("VI_ERROR_RSRC_LOCKED", "Specified type of lock cannot be obtained, or specified operation cannot be performed, because the resource is locked."),
    VI_ERROR_INV_EXPR => ("VI_ERROR_INV_EXPR", "Invalid expression specified for search."),
    VI_ERROR_RSRC_NFOUND => ("VI_ERROR_RSRC_NFOUND", "Insufficient location information or the requested device or resource is not present in the system."),
    VI_ERROR_INV_RSRC_NAME => ("VI_ERROR_INV_RSRC_NAME", "Invalid resource reference specified. Parsing error."),
    VI_ERROR_INV_ACC_MODE => ("VI_ERROR_INV_ACC_MODE", "Invalid access mode."),
    VI_ERROR_TMO => ("VI_ERROR_TMO", "Timeout expired before operation completed."),
    VI_ERROR_CLOSING_FAILED => ("VI_ERROR_CLOSING_FAILED", "The VISA driver failed to properly close the session or object reference. This might be due to an error freeing internal or OS resources, a failed network connection, or a lower-level driver or OS error."),
    VI_ERROR_INV_DEGREE => ("VI_ERROR_INV_DEGREE", "Specified degree is invalid."),
    VI_ERROR_INV_JOB_ID => ("VI_ERROR_INV_JOB_ID", "Specified job identifier is invalid."),
    VI_ERROR_NSUP_ATTR => ("VI_ERROR_NSUP_ATTR", "The specified attribute is not defined or supported by the referenced object."),
    VI_ERROR_NSUP_ATTR_STATE => ("VI_ERROR_NSUP_ATTR_STATE", "The specified state of the attribute is not valid, or is not supported as defined by the object."),
    VI_ERROR_ATTR_READONLY => ("VI_ERROR_ATTR_READONLY", "The specified attribute is read-only."),
    VI_ERROR_INV_LOCK_TYPE => ("VI_ERROR_INV_LOCK_TYPE", "The specified type of lock is not supported by this resource."),
    VI_ERROR_INV_ACCESS_KEY => ("VI_ERROR_INV_ACCESS_KEY", "The access key to the resource associated with the specified session is invalid."),
    VI_ERROR_INV_EVENT => ("VI_ERROR_INV_EVENT", "Specified event type is not supported by the resource."),
    VI_ERROR_INV_MECH => ("VI_ERROR_INV_MECH", "Invalid mechanism specified."),
    VI_ERROR_HNDLR_NINSTALLED => ("VI_ERROR_HNDLR_NINSTALLED", "A handler was not installed."),
    VI_ERROR_INV_HNDLR_REF => ("VI_ERROR_INV_HNDLR_REF", "The given handler reference is either invalid or was not installed."),
    VI_ERROR_INV_CONTEXT => ("VI_ERROR_INV_CONTEXT", "Specified event context is invalid."),
    VI_ERROR_QUEUE_OVERFLOW => ("VI_ERROR_QUEUE_OVERFLOW", "The event queue for the specified type has overflowed (usually due to previous events not having been closed)."),
    VI_ERROR_NENABLED => ("VI_ERROR_NENABLED", "You must be enabled for events of the specified type in order to receive them."),
    VI_ERROR_ABORT => ("VI_ERROR_ABORT", "User abort occurred during transfer."),
    VI_ERROR_RAW_WR_PROT_VIOL => ("VI_ERROR_RAW_WR_PROT_VIOL", "Violation of raw write protocol occurred during transfer."),
    VI_ERROR_RAW_RD_PROT_VIOL => ("VI_ERROR_RAW_RD_PROT_VIOL", "Violation of raw read protocol occurred during transfer."),
    VI_ERROR_OUTP_PROT_VIOL => ("VI_ERROR_OUTP_PROT_VIOL", "Device reported an output protocol error during transfer."),
    VI_ERROR_INP_PROT_VIOL => ("VI_ERROR_INP_PROT_VIOL", "Device reported an input protocol error during transfer."),
    VI_ERROR_BERR => ("VI_ERROR_BERR", "Bus error occurred during transfer."),
    VI_ERROR_IN_PROGRESS => ("VI_ERROR_IN_PROGRESS", "Unable to queue the asynchronous operation because there is already an operation in progress."),
    VI_ERROR_INV_SETUP => ("VI_ERROR_INV_SETUP", "Unable to start operation because setup is invalid (usually due to attributes being set to an inconsistent state)."),
    VI_ERROR_QUEUE_ERROR => ("VI_ERROR_QUEUE_ERROR", "Unable to queue the asynchronous operation (usually due to the I/O completion event not being enabled or insufficient space in the session's queue)."),
    VI_ERROR_ALLOC => ("VI_ERROR_ALLOC", "Insufficient system resources to perform necessary memory allocation."),
    VI_ERROR_INV_MASK => ("VI_ERROR_INV_MASK", "Invalid buffer mask specified."),
    VI_ERROR_IO => ("VI_ERROR_IO", "Could not perform operation because of I/O error."),
    VI_ERROR_INV_FMT => ("VI_ERROR_INV_FMT", "A format specifier in the format string is invalid."),
    VI_ERROR_NSUP_FMT => ("VI_ERROR_NSUP_FMT", "A format specifier in the format string is not supported."),
    VI_ERROR_LINE_IN_USE => ("VI_ERROR_LINE_IN_USE", "The specified trigger line is currently in use."),
    VI_ERROR_NSUP_MODE => ("VI_ERROR_NSUP_MODE", "The specified mode is not supported by this VISA implementation."),
    VI_ERROR_SRQ_NOCCURRED => ("VI_ERROR_SRQ_NOCCURRED", "Service request has not been received for the session."),
    VI_ERROR_INV_SPACE => ("VI_ERROR_INV_SPACE", "Invalid address space specified."),
    VI_ERROR_INV_OFFSET => ("VI_ERROR_INV_OFFSET", "Invalid offset specified."),
    VI_ERROR_INV_WIDTH => ("VI_ERROR_INV_WIDTH", "Invalid access width specified."),
    VI_ERROR_NSUP_OFFSET => ("VI_ERROR_NSUP_OFFSET", "Specified offset is not accessible from this hardware."),
    VI_ERROR_NSUP_VAR_WIDTH => ("VI_ERROR_NSUP_VAR_WIDTH", "Cannot support source and destination widths that are different."),
    VI_ERROR_WINDOW_NMAPPED => ("VI_ERROR_WINDOW_NMAPPED", "The specified session is not currently mapped."),
    VI_ERROR_RESP_PENDING => ("VI_ERROR_RESP_PENDING", "A previous response is still pending, causing a multiple query error."),
    VI_ERROR_NLISTENERS => ("VI_ERROR_NLISTENERS", "No listeners condition is detected (both NRFD and NDAC are deasserted)."),
    VI_ERROR_NCIC => ("VI_ERROR_NCIC", "The interface associated with this session is not currently the controller in charge."),
    VI_ERROR_NSYS_CNTLR => ("VI_ERROR_NSYS_CNTLR", "The interface associated with this session is not the system controller."),
    VI_ERROR_NSUP_OPER => ("VI_ERROR_NSUP_OPER", "The given session or object reference does not support this operation."),
    VI_ERROR_INTR_PENDING => ("VI_ERROR_INTR_PENDING", "An interrupt is still pending from a previous call."),
    VI_ERROR_ASRL_PARITY => ("VI_ERROR_ASRL_PARITY", "A parity error occurred during transfer."),
    VI_ERROR_ASRL_FRAMING => ("VI_ERROR_ASRL_FRAMING", "A framing error occurred during transfer."),
    VI_ERROR_ASRL_OVERRUN => ("VI_ERROR_ASRL_OVERRUN", "An overrun error occurred during transfer. A character was not read from the hardware before the next character arrived."),
    VI_ERROR_TRIG_NMAPPED => ("VI_ERROR_TRIG_NMAPPED", "The path from trigSrc to trigDest is not currently mapped."),
    VI_ERROR_NSUP_ALIGN_OFFSET => ("VI_ERROR_NSUP_ALIGN_OFFSET", "The specified offset is not properly aligned for the access width of the operation."),
    VI_ERROR_USER_BUF => ("VI_ERROR_USER_BUF", "A specified user buffer is not valid or cannot be accessed for the required size."),
    VI_ERROR_RSRC_BUSY => ("VI_ERROR_RSRC_BUSY", "The resource is valid, but VISA cannot currently access it."),
    VI_ERROR_NSUP_WIDTH => ("VI_ERROR_NSUP_WIDTH", "Specified width is not supported by this hardware."),
    VI_ERROR_INV_PARAMETER => ("VI_ERROR_INV_PARAMETER", "The value of some parameter (which parameter is not known) is invalid."),
    VI_ERROR_INV_PROT => ("VI_ERROR_INV_PROT", "The protocol specified is invalid."),
    VI_ERROR_INV_SIZE => ("VI_ERROR_INV_SIZE", "Invalid size of window specified."),
    VI_ERROR_WINDOW_MAPPED => ("VI_ERROR_WINDOW_MAPPED", "The specified session currently contains a mapped window."),
    VI_ERROR_NIMPL_OPER => ("VI_ERROR_NIMPL_OPER", "The given operation is not implemented."),
    VI_ERROR_INV_LENGTH => ("VI_ERROR_INV_LENGTH", "Invalid length specified."),
    VI_ERROR_INV_MODE => ("VI_ERROR_INV_MODE", "Invalid mode specified."),
    VI_ERROR_SESN_NLOCKED => ("VI_ERROR_SESN_NLOCKED", "The current session did not have a lock on the resource."),
    VI_ERROR_MEM_NSHARED => ("VI_ERROR_MEM_NSHARED", "The device does not export any memory."),
    VI_ERROR_LIBRARY_NFOUND => ("VI_ERROR_LIBRARY_NFOUND", "A code library required by VISA could not be located or loaded."),
    VI_ERROR_NSUP_INTR => ("VI_ERROR_NSUP_INTR", "The interface cannot generate an interrupt on the requested level or with the requested statusID value."),
    VI_ERROR_INV_LINE => ("VI_ERROR_INV_LINE", "The value specified by the line parameter is invalid."),
    VI_ERROR_FILE_ACCESS => ("VI_ERROR_FILE_ACCESS", "An error occurred while trying to open the specified file. Possible reasons include an invalid path or lack of access rights."),
    VI_ERROR_FILE_IO => ("VI_ERROR_FILE_IO", "An error occurred while performing I/O on the specified file."),
    VI_ERROR_NSUP_LINE => ("VI_ERROR_NSUP_LINE", "One of the specified lines (trigSrc or trigDest) is not supported by this VISA implementation, or the combination of lines is not a valid mapping."),
    VI_ERROR_NSUP_MECH => ("VI_ERROR_NSUP_MECH", "The specified mechanism is not supported for the given event type."),
    VI_ERROR_INTF_NUM_NCONFIG => ("VI_ERROR_INTF_NUM_NCONFIG", "The interface type is valid but the specified interface number is not configured."),
    VI_ERROR_CONN_LOST => ("VI_ERROR_CONN_LOST", "The connection for the given session has been lost."),
    VI_ERROR_MACHINE_NAVAIL => ("VI_ERROR_MACHINE_NAVAIL", "The remote machine does not exist or is not accepting any connections. If the NI-VISA server is installed and running on the remote machine, it may have an incompatible version or may be listening on a different port."),
    VI_ERROR_NPERMISSION => ("VI_ERROR_NPERMISSION", "Access to the resource or remote machine is denied. This is due to lack of sufficient privileges for the current user or machine")
)



